<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
	<title th:text="${session.title}">123</title>
	<link th:replace="common/header"/>
	<link rel="stylesheet" th:href="@{/css/ace-skins.min.css}" />
	<link rel="stylesheet" type="text/css" th:href="@{/css/jquery.autocomplete.css}" />
</head>
	<body class="navbar-fixed">
  	<div th:replace="common/top"></div>
		<div class="container-fluid main_bg" id="main-container">
			<a id="menu-toggler" href="#"><span></span></a>
			<div th:replace="common/menu"></div>
			<div id="main-content" class="clearfix">
				<div id="page-content" class="clearfix">
					<div th:replace="common/title"></div>
					<h3 class="header smaller lighter blue"><em class="icon-plus"></em>添加热身赛报分</h3>
					<form class="form-horizontal" th:object="${footBfinfo}" method="post" th:action="@{/hy/footBfinfo/add}" name="form" autocomplete="off">
					<input type="hidden" name="bflx" th:field="*{bflx}"/>
					<input type="hidden" name="qd1" th:field="*{qd1}"/>
					<input type="hidden" name="jq2" th:field="*{jq2}"/>
						<div class="row-fluid">
						<!--PAGE CONTENT BEGINS HERE-->
                       		<div class="span12">
                                <div class="control-group">
                                    <label class="control-label">玩家:<span style="color:red">*</span></label>
                                    <div class="controls" th:text="${footBfinfo.qd1Name}">123</div>
                                </div>
                            </div>
                       	</div>
                       	<div class="row-fluid">
                            <div class="span6">
                            <div class="control-group">
								<label class="control-label" for="jq1">结果:<span style="color:red">*</span></label>
								<div class="controls">
									<label class="span3 Light">
										<input type="radio" name="jq1" id="jq1" value="2"/>
										<span class="lbl">胜</span>
									</label>
									<label class="span3 Light">
										<input type="radio" name="jq1" value="1"/>
										<span class="lbl">平</span>
									</label>
									<label class="span3 Light">
										<input type="radio" name="jq1" value="0"/>
										<span class="lbl">负</span>
									</label>
								</div>
							</div>
                            </div>
                            <div class="span6">
                                <span style="color:red" th:if="${#fields.hasErrors('qd1')}" th:errors="*{qd1}">Name Error</span>
                            </div>
                       	</div>
                       	<div class="row-fluid">
                            <div class="span6">
                            <div class="control-group">
								<label class="control-label" for="selectqd">玩家:<span style="color:red">*</span></label>
								<div class="controls">
									<input type="hidden" name="qd2" id="qd2" th:field="*{qd2}"/>
						        	<input type="text" name="selectqd" id="selectqd" class="input_fix" autocomplete="false"/>
								</div>
							</div>
                            </div>
                            <div class="span6">
                            	<span style="color:red">若下拉框无玩家信息，请手动输入玩家名称，本搜索支持模糊查询或者双击文本框</span>
                            </div>
                        </div>
						<div class="row-fluid">
							<div class="text-center span12"><button class="btn btn-primary" type="submit"><em class="icon-save"></em>提交</button>
			                    <button class="btn btn-danger" type="reset"><em class="icon-remove"></em>取消</button>
			                    <a class="btn" type="button" th:href="@{/index}"><em class="icon-arrow-left"></em>返回首页</a>
		                    </div>
						</div>
					</form>
              		<!--/#page-content-->
				</div>
				<div th:replace="common/skin :: skin"></div>
		</div><!--/#main-content-->
	</div><!--/.fluid-container#main-container-->
	<div th:replace="common/js"></div>
    <script type='text/javascript' th:src='@{/js/jquery.autocomplete.min.js}'></script>
    <script type='text/javascript' th:src='@{/js/jquery-migrate-1.4.1.min.js}'></script>
    <script type="text/javascript">
        $(document).ready(function(){
            $("#jq1").attr("checked","checked");
            var search = [];
            $.ajax({
                type: "POST",
                dataType: "json",
                url: "/hy/footBfinfo/searchUser",
                success: function(data){
                    search = data;
                    $("#selectqd").autocomplete(search,{
                        minChars: 0,
                        width: $("#selectqd").width() + 10,
                        //matchContains: "word",
                        autoFill: false,
                        formatItem: function(row, i, max) {
                            return row.nike;
                        },
                        formatMatch: function(row, i, max) {
                            return row.nike;
                        },
                        formatResult: function(row) {
                            return row.nike;
                        }
                    });
                }
            });
            $("#selectqd").result(function(event, data, formatted) {
                $("#qd2").val(data.id);
            });
        });
    </script>
	</body>
</html>
